<template>
  <descriptions :columns="columns" :data-source="details" :label-style="{ opacity: 1 }" :col-span="24" />
</template>

<script>
import { getEnumText } from '@gis/lib/enums/index.js';

export default {
  name: 'manager-info',
  components: {},
  props: {
    details: { type: Object, default: () => ({}) },
  },
  data() {
    return {
      columns: [
        { label: '是否已取得行政许可', key: 'administrative_license_obtained' },
        {
          label: '是否违法建设和违法审批',
          key: 'illegal_construction_and_illegal_approval',
          format: (v) => getEnumText('whetherOrNot', v),
        },
        { label: '违法建设', key: 'illegal_construction' },
        { label: '违法审批', key: 'illegal_approval' },
        {
          key: 'cancellation_status',
          label: '销号状态',
          format: (v) => (typeof v === 'number' ? { 1: '未销号', 0: '已销号' }[v] : '-'),
        },
        { key: 'cancellation_method', label: '销号方式' },
      ],
    };
  },
  created() {
    console.log(this.details, '详情');
  },
  methods: {},
};
</script>

<style scoped></style>
